/**
 * 
 */
package com.primestone.cim.client.business;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @author cesar.mateus
 * Jul 22, 2013 8:48:33 PM
 * WindowConstants.java
 * CIMClientApplication
 * 
 */
public class WindowConstants {
	
	public static final String EMPTY = "";
	public static final String NOBLOCK = "-1";
	public static final Boolean FALSE = false;
	public static final Boolean TRUE = true;
	public static final String HEADER_FILE = "TICKET, IDBLOCK, ISLASTBLOCK, OLDBLOCK, IDDEVICE, IDSOCKET, VARTYPE, DESCVAR, INTERVALBLOCK, TIMESTAMP, VALUE, READINGTYPE";
	public static final String PROP_FILENAME = "properties.properties";
	public static final String KEY_LOG_FILE = "LOG_FILE";
	
	public static String LOG_FILE;
	
	static {
		Properties prop = new Properties();
		FileInputStream fileInputStream = null;
    	try {
            File propFile = new File(PROP_FILENAME);
    		System.out.println("---- from WindowConstants class: "+propFile.getAbsolutePath());
    		fileInputStream = new FileInputStream(propFile);
    		prop.load(fileInputStream);
    		LOG_FILE = prop.getProperty(KEY_LOG_FILE);
    	} catch (IOException ex) {
    		ex.printStackTrace();
        } finally {
        	if (fileInputStream != null) {
        		try {
					fileInputStream.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
        	}
        }
	}
	
}
